module.exports = app => {
    const { STRING, INTEGER, DATE, BIGINT } = app.Sequelize;

    const UserCircle = app.model.define('user_circle', {
        id: {
            type: BIGINT.UNSIGNED,
            primaryKey: true,
            autoIncrement: true,
        },
        user_id: { type: BIGINT.UNSIGNED, allowNull: false },
        circle_id: { type: BIGINT.UNSIGNED, allowNull: false },
        joined_at: DATE,
    }, {
        tableName: 'user_circles',
        timestamps: false,
    });

    return UserCircle;
};